package org.apache.hadoop.fs.obs.memartscc;

import java.io.IOException;
import java.nio.ByteBuffer;

public interface ICache {
    int init(String ak, String sk, String token, String endpoint, String obsBucketName,
        boolean enablePosix, String config, String otherInfo) throws IOException;

    int read(boolean isPrefetch, long prefetchStart, long prefetchEnd, ByteBuffer buf, long offset,
        long len, String objectKey, long modifyTime, String etag, boolean isConsistencyCheck, byte[] dt) throws IOException;

    int getObjectShardInfo(CcGetShardParam ccGetShardParam);

    void refreshAkSk(String ak, String sk, String token);

    byte[] getDT();

    void close();
}
